Xbasic
SQL::TableInfoListColumns Method
Syntax
Result_Flag as L = ListColumns([L IncludeTypes = .f.])
Arguments
- Result_Flag
Inicates whether the operation was successful.
- SQL::TableInfo
A SQL::TableInfo object.
- SQL::DataTypeInfo
A SQL::DataTypeInfo object.
- IncludeTypes
Optional. The column before which to insert the new column.
Description
Create a list of the table columns (optionally including types).
Discussion
The InsertColumn() method inserts a new column into the column property before the column specified by InsertBefore. Note : Names must not duplicate ("" counts as a name).
Example
dim ti as SQL::TableInfo
dim co1 as SQL::DataTypeInfo
dim co2 as SQL::DataTypeInfo
co1.Name = "Customer"
co1.AlphaType = "Character"
col2.Name = "Product"
col2.AlphaType = "Character"
? ti.AddColumn(co1)
= 1
? ti.InsertColumn(co2,1)
= .T.
? ti.ColumnNumber("Customer")
= 2See Also